Continuations and Semantics

نویسنده

  • Andrew Wilson
چکیده

Semantic compositionality (where the meaning of a phrase depends only on the meaning of its sub-phrases) is a desirable property for a language to possess, because it admits proofs by structural induction over the terms of the language. Regular expressions and propositional logic are compositional languages in this sense. However, although some programming languages are said to have a compositional semantics, they do not have a strictly compositional semantics as deened above. For instance, consider Tennent's principle of abstraction: any syntax domain of a language may have deenition and invocation mechanisms for abstracts 1. As soon as we allow naming in our language, we attach meanings to symbols which are not inherent to their syntactic structure. Suppose we have the (e.g., PASCAL) program fragment: mystery(1,2) then we cannot say what this means merely by its structure, because the meaning of mystery is a mystery! We need to parameterize our semantics with what compiler writers would call a symbol table | a partial function from names to their`precom-piled' meanings. We no longer have strict com-positionality, because the meaning of a phrase may depend on meanings deened elsewhere. We have introduced a little context sensitivity to our language. If we did not allow recursive deenitions, we could overcome these diiculties. We could still use structural induction if we treated names as macros and expanded them before use. Alternatively, we could add special \deenition-expansion" cases to the induction steps of our proofs, and expand names \on the y". This would involve parameterizing our induction principle over the symbol table and adding special induction cases that could add deenitions to the table. 1 abstract, n. | a named expression that is invoked by mentioning its name. (See 34, chapter 8]) It turns out that even with recursion, we can use the same trick | despite the fact we cannot pro-scribe non well-founded recursive abstracts. So we have a kind of parameterized induction principle for a kind of parameterized compositionality, and McCarthy 23] calls this principle Recursion Induction. ... we have a rule called recursion induction for making arguments that in the usual formulations of recursive function theory] are made by mathematical induction. This rule may be regarded as taking one of the theorems of recursive function theory and giving it the status of a rule of inference. Recursion induction may be described as follows: Suppose we have a recursion equation de-ning a function f, …

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Non-Speculative and Upward Invocation of Continuations in a Parallel Language

A method of preserving the sequential semantics in parallel pro grams with rst class continuations is to invoke continuations non speculati vely This method which prevents a continuation from being invoked as long as its invocation can infringe the sequential semantics reduces parallelism by the severe conditions that it imposes especially on upward uses In this paper we present new conditions ...

متن کامل

Partial Continuations as the Diierence of Continuations a Duumvirate of Control Operators ?

We deene a partial continuation as the diierence of two continuations. We exhibit, in a single framework, several design choices and their impact on semantics. The ability of partial continuations to manipulate stack frames blurs the nature of dynamic extent; therefore, we introduce a new concept of preexal extent that characterises the time during which a partial continuation can be reiied. We...

متن کامل

Continuations in Prolog

Continuations are well known in functional programming where they have been used to transform and compile programs. Some languages provide explicit manipulations of the continuation for the user: The user can catch and modify the current continuation. Continuations have also been used in the logic programming context to give a denotational semantics for Prolog, to generate Prolog compilers and ...

متن کامل

Continuations and adverbial modifiers

We extend de Groote’s approach to natural language or Montague semantics with labels and combine it with Parsons event semantics. We argue that within this framework continuations allow one to deal with adverbs.

متن کامل

Partial Continuations as the Difference of Continuations - A Duumvirate of Control Operators

We de ne a partial continuation as the di erence of two continua tions We exhibit in a single framework several design choices and their impact on semantics The ability of partial continuations to manipulate stack frames blurs the nature of dynamic extent therefore we introduce a new concept of pre xal extent that characterises the time during which a partial continu ation can be rei ed We prop...

متن کامل

Non - speculative and Upward Invocation ofContinuations in a Parallel

A method of preserving the sequential semantics in parallel programs with rst-class continuations is to invoke continuations non-speculatively. This method, which prevents a continuation from being invoked as long as its invocation can infringe the sequential semantics, reduces parallelism by the severe conditions that it imposes, especially on upward uses. In this paper, we present new conditi...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1993